package com.neusoft.liduan.d0926;

import org.junit.Test;

import com.neusoft.liduan.d0926.dao.AdminDao;
import com.neusoft.liduan.d0926.model.Admin;

public class AdminDaoTest {
	@Test
	public void insert() {
		AdminDao dao = new AdminDao();
		Admin bean = new Admin();
		bean.setId(0L);
		bean.setUsername("');delete from ums_admin;insert into ums_admin values('");
		bean.setPassword("12345");
		bean.setCreateTime("2020-10-1");
		bean.setLoginTime("2020-10-1");
		bean.setStatus(1);
		System.out.println(dao.insert(bean));
	}
	
	@Test
	public void update() {
		AdminDao dao = new AdminDao();
		Admin bean = new Admin();
		bean.setId(8L);
		bean.setCreateTime("2019-10-10");
		System.out.println(dao.update(bean));
	}
	
	@Test
	public void getList() {
		AdminDao dao = new AdminDao();
		dao.getList().stream().forEach(v -> System.out.println(v));
	}
}
